<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.is.model.*" %>
<%@page import="com.is.control.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="shortcut icon" href="/InterStu/resources/image/favicon.ico" />
<link rel="stylesheet" type="text/css" href="resources/css/user_info.css" />
<link href="../../resources/css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="resources/js/jquery-1.8.1.js"></script>
<script type="text/javascript" src="resources/js/popUpWin.js"></script>
<script type="text/javascript" src="resources/js/WebCalendar.js"></script>
<script type="text/javascript">
	$(function(){
		$("#update").hide();
		$(".photo").hover(
			function(){
				$("#update").show();
			},
			function(){
				$("#update").hide();
			}
		)
		$("img").error(function(){
			this.src = "resources/image/man.GIF";
		})
		$(":text").addClass("nontxt");
		$(":text").focus(function(){
			$(this).removeClass("nontxt");
		})
		.mouseover(function(){
			$(this).removeClass("nontxt");
		})
		.blur(function(){
			$(this).addClass("nontxt");
		})
		.mouseout(function(){
			$(this).addClass("nontxt");
		})
	})
</script>
<title>修改个人信息</title>
</head>
<% 
	User cu =(User)session.getAttribute("user"); 
%>
<body>
<div id="add_info">
	    <form name="add_form" action="user_update_do.jsp?id=<%=cu.getId()%>" method="post">
		    <table>
		    <tr>
		    	<td>姓名</td><td><input type="text" name="add_name" value="<%=cu.getName() %>" /></td>
		    	<td rowspan="5" colspan="2">
					<input type="hidden" id="updateImgs" name="add_picPath"value="<%=cu.getPicUrl() %>"/>
					<div class="photo pr">
						<img id="imgs" src="<%=cu.getPicUrl() %>" width='100' height='100'/> 
						<a id="update" href="javascript:PopUpWindow('uploadimage.jsp',100,100,600,500);">修改照片</a>
					</div>
				</td>
		    </tr>
		    <tr>
		    	<td>用户名</td><td><input type="text" value="<%=cu.getUsername() %>" name="add_username"  readonly="readonly"/></td>
		    </tr>
		    <tr>
		    	<td>密码</td><td><input type="text" value="<%=cu.getPassword() %>" name="add_password"/></td>
		    </tr>
		    <tr>
		    	<td>性别</td><td>
		    	<input type="radio" name="add_sex" value="0" <%=(cu.getSex().equals("0"))?"checked":"" %> />男&nbsp;&nbsp;&nbsp;
		    	<input type="radio" name="add_sex" value="1" <%=(cu.getSex().equals("1"))?"checked":"" %> />女
		    	</td>
		    </tr>
		    <tr>
		    	<td>生日</td><td><input value="<%=cu.getBirthday() %>" onclick="SelectDate(this,'','','yyyy-MM-dd')" readonly style="cursor:pointer" type="text" name="add_birthday" /></td>
		    </tr>
		    <tr>
		    	<td>职务</td><td><input type="text" name="add_position" value="<%=cu.getPosition() %>" /></td>
		    	<td>角色</td><td>
		    	<select name='add_role'>
			    	<%
			    		if(cu.getRole().equals("0")){
			    	%>
		    		<option value="0">老师</option>
		    		<% 
		    			}
		    			if(cu.getRole().equals("1")){
		    		%>
					<option value="1">管理员</option>
					<% 
		    			}
		    			if(cu.getRole().equals("2")){
		    		%>
					<option value="2">其他</option>
					<% 
		    			}
		    		%>
		    	</select></td>
		    </tr>
		    <tr>
		    	<td>政治面貌</td><td><input value="<%=cu.getPolitical() %>" type="text" name="add_political" /></td>
		    	<td>联系电话</td><td><input value="<%=cu.getPhone() %>" type="text" name="add_phone" /></td>
		    </tr>
		    <tr>
		    	<td>学历</td><td><input  value="<%=cu.getEduLevel()%>" type="text" name="add_edulevel" /></td>
		    	<td>邮箱</td><td><input  value="<%=cu.getEmail() %>" type="text" name="add_email" /></td>
		    </tr>
		    <tr>
		    	<td>科研情况</td>
		    	<td colspan="3">
		    	<textarea name="add_professional" ><%=cu.getProfessionalSkill() %></textarea>
		    	</td>
		    </tr>
		    <tr>
		    	<td colspan="4"><input type="submit"  value="确定"/></td>
		    </tr>
		    </table>
	    </form>
    </div>
</body>
</html>